<?php
include_once '../include/lxbase.class.php';
$webconn=new Lxbase();
$domain = $_GET["domain"];
$agent = strtolower($_SERVER['HTTP_USER_AGENT']);
if(strpos($user_agent,'micromessenger')===false) {
	$pla=13;
}else{
	$pla=4;
}
$userinfo = $webconn->viewdata("*","users","where three_domain='{$domain}'");
$urlhost = empty($_SERVER["SERVER_NAME"])?$_SERVER["HTTP_HOST"]:$_SERVER["SERVER_NAME"];
if($urlhost == 'qiyue.zhongsou.com' || $urlhost=='qiyuenew.zhongsou.com'){
	$vqhost="http://vq.zhongsou.com/";
}else{
	$vqhost="http://kaifa.vq.zhongsou.com/";
}
$arr = array("iPhone","iPad","webOS","BlackBerry","Android");
foreach($arr as $value){
	if(stripos($agent,$value) !== false ){
		$url=$vqhost.'?g=Wap&pla=4&token='.$userinfo["token"];
		header("location:{$url}");
		exit;
	}
}
$url="http://".$urlhost."/?g=pc&a=showindex&u=".$userinfo["id"];
header("location:".$url);
exit;